<template>
    <div>
        <transition name="router-fade" mode="out-in">
            <keep-alive>
                <router-view v-if="$route.meta.keepAlive"></router-view>
            </keep-alive>
        </transition>

        <transition name="router-fade" mode="out-in">
            <router-view v-if="!$route.meta.keepAlive"></router-view>
        </transition>

        <icon name="home" />
    </div>
</template>

<style lang="scss">
@import '@/assets/scss/common.scss';

.router-fade-enter-active,
.router-fade-leave-active {
    transition: opacity 0.3s;
}

.router-fade-enter,
.router-fade-leave-to {
    opacity: 0;
}
</style>
